Ext.define('UmlWebEditor.tests.BlocksFactoryTest', {
	extend: 'UmlWebEditor.tests.Test',
	tests: {
		generateIdTest: function () {
			var factory = Ext.create('UmlWebEditor.factories.BlocksFactory');
			var firstId = factory.getNextId();
			verify(factory.getNextId() == firstId + 1, "first id != 1");
			verify(factory.getNextId() == firstId + 2, "second id != 2");
			var error = false;
			try {
				var block = factory.createBlock('!!!', 12);
			} catch(e) {
				error = true;
			}
			verify(error, "createBlock - not catch error");
			verify(factory.getNextId() == firstId + 3, "third id != 3");
			error = false;
			try {
				var block = factory.createEdge('!!!', 12);
			} catch(e) {
				error = true;
			}
			verify(error, "createEdge - not catch error");
			verify(factory.getNextId() == firstId + 4, "third id != 4");
		}
	}
});
